package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONArray;
import org.json.JSONObject;
/**
 * Created by Administrator on 2016/4/12.
 */
@HttpInlet(Net.DINGDANXQ)
public class PostDingXiang extends WHAsyPost<PostDingXiang.Info> {
    public String driverid = "";
    public String orderid = "";
    public PostDingXiang(String driverid, String orderid, AsyCallBack asyCallBack) {
        super(asyCallBack);
        this.driverid = driverid;
        this.orderid = orderid;
    }
    @Override
    protected Info parser(JSONObject object) {
        Info info = new Info();
        info.message = object.optString("message");

        if (info.message.equals("0")) {

        } else {
            info.mobile = object.optString("mobile");
            info.paytype = object.optString("paytype");
            info.usetime = object.optString("usetime");
            info.name = object.optString("name");
            info.car = object.optString("car");
            info.account = object.optString("account");

            info.saycontent=object.optString("saycontent");
            info.isbackorder=object.optString("isbackorder");
            info.username=object.optString("username");
            info.posttime=object.optString("posttime");
            info.content=object.optString("content");
            info.star=object.optString("star");

            info.ismove=object.optString("ismove");
            info.isbackmoney=object.optString("isbackmoney");
            info.isbackorder=object.optString("isbackorder");
            info.backmoney=object.optString("backmoney");

            info.name2=object.optString("name2");
            info.mobile2=object.optString("mobile2");
                info.tip = object.optString("tip");
//                info.reward = object.getString("reward");
            info.addresslist = object.optJSONArray("addresslist");
        }
        return info;
    }
    public static class Info {
        public String message = "";
        public String name = "";
        public String mobile = "";
        public String paytype = "";
        public String usetime = "";
        public String car = "";
        public String account = "";
        public String tip = "";
        public String reward = "";
        //未加
        public String saycontent="";
        public String avatar;
        public String name2;
        public String mobile2;
        public String username;
        public String posttime;
        public String content;
        public String star;

        public String ismove;
        public String isbackorder;
        public String isbackmoney;
        public String backmoney;

        public JSONArray addresslist;
    }
}
